package com.jimmy.medical.entity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * 会员合同关联关系
 * 
 * @author jimmy
 * @since 0.1
 */
@Entity
@Table(name = "member_contract")
public class MemberContract extends AbstractEntity {
	/** 会员*/
	@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "member_id")
    @NotFound(action = NotFoundAction.IGNORE)
    private Member member;
	
	/** 合同*/
	@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "contract_id")
    @NotFound(action = NotFoundAction.IGNORE)
	private Contract contract;

	public Member getMember() {
		return member;
	}

	public void setMember(Member member) {
		this.member = member;
	}

	public Contract getContract() {
		return contract;
	}

	public void setContract(Contract contract) {
		this.contract = contract;
	}
}
